home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 138 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: phoenix.rhein.de!yaps!arno
  2. From: arno@yaps.rhein.de (Arno Eigenwillig)
  3. Newsgroups: comp.std.c
  4. Subject: Re: ... char * * promotion to char const * const * ...
  5. Message-ID: <FgzYx*iif@yaps.rhein.de>
  6. Date: Thu, 18 Jan 1996 16:19:53 +0100
  7. References: <4dgj8q$qin@unix.sri.com> <KANZE.96Jan17121659@slsvewt.lts.sel.alcatel.de>
  8.  <DLBzGB.J60@polo.demon.co.uk> <4dju63$9mq@fsgm01.fnal.gov>
  9. Organization: Yet Another Private Site in Meckenheim, Germany
  10. X-Copyright: This article may not be distributed on a CD-ROM
  11.  or in printed form without prior written consent of the author.
  12. X-Newsreader: Arn V 1.04
  13.  
  14. In article <4dju63$9mq@fsgm01.fnal.gov>, David Sachs writes:
  15.  
  16. > >>in fact, it was
  17. > >>going to allow all casts which added const anywhere in the type.  Then
  18. > >>someone pointed out that the conversion 'char ** -> char *const *' was
  19. > >>unsafe.
  20.  
  21. > >Interesting.  Could you enlighten us (well, me anyway) as to *why* it
  22. > >is unsafe.  I don't find it immediately obvious.
  23.  
  24. Same for me.
  25.  
  26. > Actually 'char ** -> char *const *' is a safe conversion. The related
  27. > UNSAFE conversion is 'char ** -> const char **'.
  28.  
  29. But this is not what James wrote about. He spoke of "_adding_ const".
  30.  
  31. -- __
  32. __/// Arno Eigenwillig /\ <arno@yaps.rhein.de> \/ PGP key available.
  33. \XX/   V+49-2225-5870  /\ <Arnooo @ #amigager> \/ MIME 8bit welcome.
  34.